package com.example.yls.demoa;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class IndexActivity extends AppCompatActivity {
    private Button btn_videoview;
    private Button btn_surfaceview;
     @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_index);
        findViewById(R.id.videoview).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent();
                intent.setClass(IndexActivity.this,MainActivity.class);
                startActivity(intent);
            }
        });
         findViewById(R.id.surfaceview_mediaplayer).setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 Intent intent=new Intent();
                 intent.setClass(IndexActivity.this,SurfaceViewActivity.class);
                 startActivity(intent);
             }
         });
         findViewById(R.id.surfaceview_mediaplayer_mediacontroller).setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 Intent intent=new Intent();
                 intent.setClass(IndexActivity.this,MediaControllerActivity.class);
                 startActivity(intent);
             }
         });


     }
}
